import { defineStore } from 'pinia'
import {
  userList
} from '@/service/blog/friends'

interface friendsState{
  usersList: any[],

}

const useFriendsStore = defineStore('friends', {
  state: ():friendsState => ({
    usersList: [],
  }),
  actions: {
    getUserListActions(limit: number, size: number) {
      userList(limit, size).then(res => {
        this.usersList = res
      })
    }
  }
})

export default useFriendsStore
